package com.zsz.springcloud.service.impl;

import com.zsz.springcloud.dao.PaymentDao;
import com.zsz.springcloud.entities.Payment;
import com.zsz.springcloud.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class PaymentServiceImpl implements PaymentService {

    //@Autowired  来自 ：org.springframework.beans.factory.annotation.Autowired
    //@Resource来自 ：javax.annotation.Resource   这两个一样都可以进行依赖注入
    @Resource
    private PaymentDao paymentDao;


    @Override
    public int create(Payment payment) {
        return paymentDao.create(payment);
    }

    @Override
    public Payment getPaymentById(Long id) {

        return paymentDao.getPaymentById(id);
    }
}
